import requests

url = 'https://api16-normal-useast1a.tiktokglobalshop.com/api/v1/product/global/product/get'

product_id = '1732464232616266698'
seller_id = '7496123968648743882'

params = {
    'locale': 'zh-CN',
    'language': 'zh-CN',
    'oec_seller_id': seller_id,
    'aid': '6556',
    'app_name': 'i18n_ecom_shop',
    'fp': 'verify_mb08hmy7_cLP8UXlA_rX6l_4e9P_APMd_9t8zXbS4wSTF',
    # 'device_platform': 'web',
    # 'cookie_enabled': 'true',
    # 'screen_width': '1512',
    # 'screen_height': '982',
    # 'browser_language': 'zh',
    # 'browser_platform': 'MacIntel',
    # 'browser_name': 'Mozilla',
    # 'browser_version': '5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36',
    # 'browser_online': 'true',
    # 'timezone_name': 'Asia/Kuala_Lumpur',
    'product_id': product_id,
    # 'msToken': '_T35gJMJBTGqJMCFWuzSlj_V2na0xBzlrUyQwepTQcOZLGmInjGEZzmigXyOuMHtc23h9MbJ20Lop4Jb6ladwWjYP7j4SyjwyIeVHTEx84ZAOhJJF0ndwFzUhRMxyqOy385PI9Z-eg==',
    # 'X-Bogus': 'DFSzswVO9BTANxu1CVIMYGlUrnM1',
    # 'X-Gnarly': 'MHb2ommi6DaXRPwuyhrEsn6ajuw/ioWP-OgCmIdFqvqN4-iVkmK0VNdjR7tPm8YxExK72aowtaUnl/EJZ6sSBLAJihdWYq3d6g5dO//Wf3lnNUR3xYqdlOq2wsmldmZwBIbeWhYYW9NxDI9e2X4lELJqBY8XBwWGkubIeOXzTJYfp7KVDQOfUyWaNIlCSNTAzEhe4xY6/tZHm6qJZ/CsB40icVMue9rQwa5H1a6/HZiyXmMCeISS2QB7hye4ZQLOlG4qrG1zfG52'
}

headers = {
    'accept': '*/*',
    'accept-language': 'zh,en-US;q=0.9,en;q=0.8,ja;q=0.7,zh-CN;q=0.6,zh-TW;q=0.5',
    'cache-control': 'no-cache',
    'origin': 'https://seller.tiktokglobalshop.com',
    'pragma': 'no-cache',
    'priority': 'u=1, i',
    'referer': 'https://seller.tiktokglobalshop.com/',
    'sec-ch-ua': '"Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"macOS"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-site',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36'
}

cookies = {
    # 'user_oec_info': '0a5350e0b2bf5815ab1276ba7f86a087621dc5e0becb0d9690f9fe144041f19ba1f3720554ad0031adecfe18f7338f7c515da7ccd74d38631b06f48f6157185124dfc0a25430b75f01347dd557e17ac8f0f64a50371a490a3c000000000000000000004ecd81ea18f7d9175beacf071dcc52d2908e8983c5e875fdadb3fe0d94f16e98bb8f248c9bdd38d76fdec97d55c580334ebb10af88ed0d1886d2f6f20d220104d16c9470',
    # 'passport_csrf_token': '5eb9282f81ef1f7e0b78774b3fa4ddff',
    # 'passport_csrf_token_default': '5eb9282f81ef1f7e0b78774b3fa4ddff',
    # 'd_ticket': 'c8a91292335c76dfd78d92f1d349e655a05c4',
    # 'store-country-sign': 'MEIEDNyykVuFPxFxEfyT8AQgNnYvpx6FX-5SgATLwK3TKXs5sJ7sElv71r9PurqdmEwEEETfmychG0IZe0t21AMDin0',
    # 'store-country-code': '-',
    # '_m4b_theme_': 'new',
    # 'uid_tt': '5c15296f315eae9e9415a8a6fcf0346b822688236ae4306a2187b3666bae2f4f',
    # 'uid_tt_ss': '5c15296f315eae9e9415a8a6fcf0346b822688236ae4306a2187b3666bae2f4f',
    # 'sid_tt': 'e13e279257b83beea95e753f7f61f40d',
    'sessionid': 'e13e279257b83beea95e753f7f61f40d',
    'sessionid_ss': 'e13e279257b83beea95e753f7f61f40d',
    # 'msToken': 'mh7bSffcrRdDMuybZsG1cknmJSzo0w9EO6IATZ_gw9LRc18q1mUh08ZjxjzcvgwhbhE9M9GCn_cFR8f696W4EYe-xx3I0Luwnun-4BZtIq4g9UWILSvO-ECZouTC_-WBT7Cnedid',
    # 'sid_guard': 'e13e279257b83beea95e753f7f61f40d%7C1747970504%7C863997%7CMon%2C+02-Jun-2025+03%3A21%3A41+GMT',
    # 'sid_ucp_v1': '1.0.0-KDgxYjgzZGU3NTIyNTljMjNhYmU3NDgyNzgwODc5ZWFiN2NhYzc1YjgKGgiBiM_Cqfng7WcQyNO_wQYYnDM4AUDqB0gEEAMaA215MiIgZTEzZTI3OTI1N2I4M2JlZWE5NWU3NTNmN2Y2MWY0MGQ',
    # 'ssid_ucp_v1': '1.0.0-KDgxYjgzZGU3NTIyNTljMjNhYmU3NDgyNzgwODc5ZWFiN2NhYzc1YjgKGgiBiM_Cqfng7WcQyNO_wQYYnDM4AUDqB0gEEAMaA215MiIgZTEzZTI3OTI1N2I4M2JlZWE5NWU3NTNmN2Y2MWY0MGQ',
    # 'SHOP_ID': '7483753142597748496',
    # 'ttwid': '1%7CZ3Ygfi9WKAMAirEoBmIxnWuuOKicoQxEylgSNEdEviw%7C1748061131%7C10bd7cd3fb0d53d80935b1d83a4200d1c2e2eca42d2a636a9b92d39c4552a094'
}

response = requests.get(url, params=params, headers=headers, cookies=cookies)

result = response.json()

product = result['data']

print(product.get('product_id'))
print(product.get('package_weight'))